package com.test.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.test.common.Query;
import com.test.entity.SysDepartment;
import com.test.manager.SysDepartmentManager;
import com.test.mapper.SysDepartmentMapper;
import com.test.mapper.SysUserMapper;

@Component("SysDepartmentManager")
public class SysDepartmentManagerImpl implements SysDepartmentManager {

	@Autowired
	private SysUserMapper sysUserMapper;
	
	@Autowired
	private SysDepartmentMapper sysDepartmentMapper;

	public List<SysDepartment> listDepartment(Query query){
		List<SysDepartment> list =sysDepartmentMapper.list(query);
		return list;
	}

	@Override
	public int save(SysDepartment department) {
		return sysDepartmentMapper.save(department);
	}

	@Override
	public int update(SysDepartment department) {
		return sysDepartmentMapper.update(department);
	}

	@Override
	public int removeByDepartCode(String depart_code) {
		return sysDepartmentMapper.removeByDepartCode(depart_code);
	}

	@Override
	public SysDepartment listDepartmentByParameter(SysDepartment department) {
		return sysDepartmentMapper.listDepartmentByParameter(department);
	}


	
	
}
